#ifndef MUSIC_BOARD_H
#define MUSIC_BOARD_H

#include "FmodEngine.h"
#include "IrrEngine.h"

class MusicBoard
{
public:
	MusicBoard(bool left, float x, float y);
	void Update(float master, bool mute);
	bool EventHandler(const SEvent& event);
	void SetVolume(int i);
	void Cleanup();

private:
	Channel* m_pChannel;
	Sound* m_pMusic;
	core::string<wchar_t> m_wFile;
	path m_Path;
	bool m_bLeft;
	bool m_bPaused;
	bool m_bLooping;
	bool m_bLPF;
	bool m_bHPF;
	bool m_bMute;
	bool m_bPlaying;
	bool m_bLastPlaying;
	IGUIButton* m_pPlayButton;
	IGUIScrollBar* m_pSongPosition;
	IGUIScrollBar* m_pVolBar;
	IGUIScrollBar* m_pPanBar;
	IGUIScrollBar* m_pPitchBar;
	IGUIScrollBar* m_pSpeedBar;
	IGUIStaticText* m_pFileDisplay;
	IGUIFileOpenDialog* m_pFileOpen;

	DSP* m_pDsp1;
	DSP* m_pDsp2;
	DSP* m_pPitchShifter;
	u32 m_PlayPos;
	u32 m_LastPlayPos;
	u32 m_MusicLength;
	f32 m_Vol;
	f32 m_Pan;
	f32 m_Pitch;
	f32 m_Freq;
	f32 m_Speed;

	f32 m_LastVol;
	f32 m_LastPan;
	f32 m_LastPitch;
	f32 m_LastSpeed;
};
#endif